/* 基础样式 */
.nav {
    width: 240px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo p {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

/* 导航菜单项 */
.content {
    flex: 1;
    padding: 10px 0;
}

.search, .classify {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.search:hover, .classify:hover {
    background: #f5f5f5;
}

.search svg, .classify svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.search a, .classify a {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 14px;
}

/* 退出登录 */
.exit {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    color: #d81e06;
    margin-top: auto;
    transition: background 0.2s;
}

.exit:hover {
    background: #f5f5f5;
}

.exit svg {
    width: 20px;
    height: 20px;
}

.exit p {
    margin: 0 0 0 10px;
}

/* 提示消息样式 */
.toast-shadow {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.toast-animation {
    animation: toast 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

@keyframes toast {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

/* 加载指示器样式 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 16px;
    text-align: center;
}

/* 分页按钮禁用状态 */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 搜索按钮样式 */
.search-button {
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #1565c0;
}

/* 模态框动画 */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 200ms, transform 200ms;
}

.modal-exit {
    opacity: 1;
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms, transform 200ms;
}

/* 新增样式 */
.reset-button {
    background-color: #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border-radius: 0.375rem;
    margin-left: 8px;
    transition: background-color 0.3s;
}

.reset-button:hover {
    background-color: #d1d5db;
}

.edit-modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    max-width: 28rem;
    width: 100%;
    margin: 0 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.form-button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s;
}

.save-button {
    background-color: #3b82f6;
    color: white;
}

.save-button:hover {
    background-color: #2563eb;
}

.cancel-button {
    border: 1px solid #d1d5db;
    color: #374151;
}

.cancel-button:hover {
    background-color: #f3f4f6;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 36rem;
    position: relative;
}

.search-input {
    flex-grow: 1;
    padding-left: 2.5rem;
    padding-right: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem 0 0 0.375rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.search-container .fa-search {
    position: absolute;
    left: 0.75rem; /* 调整到输入框内左侧 */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #9CA3AF;
}

.search-button {
    background-color: #3b82f6;
    color: white;
    padding: 0 1.25rem;
    border-radius: 0 0.375rem 0.375rem 0;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #2563eb;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.edit-button {
    background-color: #6366f1;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.edit-button:hover {
    background-color: #4f46e5;
}

.delete-button {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.delete-button:hover {
    background-color: #dc2626;
}

.role-admin {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-user {
    background-color: #dcfce7;
    color: #166534;
}

.loading-row {
    text-align: center;
    color: #6b7280;
}

.no-results-row {
    text-align: center;
    color: #6b7280;
    padding: 3rem 0;
}

/* 模态框样式 */
#addUserModal, #editUserModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#modalContent {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    max-width: 28rem;
    width: 100%;
    margin: 0 1rem;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
}

#modalContent.active {
    transform: scale(1);
    opacity: 1;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
}

tbody tr:hover {
    background-color: #f9fafb;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* 模态框动画样式 */
#modalContent {
    transition: all 0.3s ease;
    transform: scale(0.95);
    opacity: 0;
}

#modalContent.active {
    transform: scale(1);
    opacity: 1;
}

/* 在文件末尾添加以下样式 */
.hidden {
    display: none;
}

.scale-95 {
    transform: scale(0.95);
}

.scale-100 {
    transform: scale(1);
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.modal-content {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-20px);
}
.modal-content.active {
    opacity: 1;
    transform: translateY(0);
}